from django import forms
from django.forms import widgets
from django.core import validators
from .validators import MyLength, start_with_zzy


class LoginForm(forms.Form):
    username = forms.CharField(min_length=5, label="用户名", widget=widgets.TextInput(attrs={
        "class": "form-control"
    }), validators=(validators.MaxLengthValidator(10),), )
    password = forms.CharField(min_length=5, label="密码", widget=widgets.PasswordInput(attrs={
        "class": "form-control",
        "aria-describedby": "sizing-addon3"

    }), validators=(MyLength(10),))
